package com.cizzy.favorite.service;

import com.cizzy.favorite.common.Result;
import com.cizzy.favorite.entity.Favorite;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cizzy.favorite.entity.dto.VideoDTO;
import com.cizzy.favorite.entity.vo.FavoriteRequest;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author crissy-月下闲人
 * @since 2023-11-02
 */
public interface IFavoriteService extends IService<Favorite> {

    Result<Favorite> createFavorite(FavoriteRequest favoriteRequest);

    Result<Favorite> cancelFavorite(FavoriteRequest favoriteRequest);

    Result<Boolean> isFavorited(Long userId, Long videoId);

    Result<List<VideoDTO>> getFavoriteById(Long userId);

    Result<List<VideoDTO>> getFavoritePageById(Long userId, Integer page, Integer pageSize);

    Result<String> toLike(Long userId);

    Result<List<VideoDTO>> getFavList();
}
